package standards.huawei.err;

public class Standards_Huawei_ERR_08 {
    public static void main(String[] args) {
        try {
            // 无法获得func抛出的异常，而得到-1
            System.out.println(func());
        } catch (Exception ex) {
            // 处理异常
        }
    }
    
    public static int func() throws Exception {
        for (int i = 1; i < 2; i++) {
            try {
                throw new Exception();
            } finally {
                return -1; 
            }
        }
        return 0;
    }
}
